package com.sidianzhong.sdz.interceptor;


import com.sidianzhong.sdz.utils.SocketServer;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
/**
 * spring boot 容器加载后自动监听
 * @author lijunming
 * @date 2018/7/22 下午2:30
 */
@Component
public class MyCommandRunner implements CommandLineRunner {
    @Override
    public void run(String... args) {
        System.out.println("socket server");
        try {
            new Thread(() -> {
                SocketServer.startAction();
            }).start();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
